<Content>
    <Field>
        <Label>Val的值：</Label>
        <Control>
            <Input Value="val" IsStatic />
        </Control>
    </Field>
    <Field>
        <Label>开关：</Label>
        <Control>
           <Switch  @bind-Checked="val">
                开关
           </Switch>
        </Control>
    </Field>
    <Field>
        <Control>
            <Button Color="Color.Info" @onclick="setNewValue">反选</Button>
        </Control>
    </Field>
</Content>
@code{
    bool val;
    void setNewValue()
    {
        val=!val;
    }
}
